package com.seecen.service.impl;

import com.seecen.cons.Cons;
import com.seecen.dao.DictionaryDao;
import com.seecen.pojo.Dictionary;
import com.seecen.service.DictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DictionaryServiceImpl implements DictionaryService {

    @Autowired
    private DictionaryDao dictionaryDao;

    @Override
    public List<Dictionary> findDictionarysByType(String type) {
        return dictionaryDao.findDictionarysByType(type);
    }

    @Override
    public List<Dictionary> findProvinces() {
        return dictionaryDao.findProvinces(Cons.DICTIONARY_PROVINCE);
    }

    @Override
    public List<Dictionary> findRegionsByParent(int pid) {
        return dictionaryDao.findRegionsByParent(pid);
    }
}
